/*package com.mproject.activity;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;

import com.mproject.adapter.Add_Member_Added_List_Adapter;
import com.mproject.customclass.UserAdded;

public class AddMemberToProject extends Activity implements OnClickListener{

	private TextView add_member;
	private EditText member_id;
	private ListView member_added_list;
	private List<UserAdded> members;
	private Button finish_button;


	*//** Called when the activity is first created. *//*
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.add_member_project_wizard); 

		add_member = (TextView)findViewById(R.id.add_member_button);
		add_member.setOnClickListener(this);
		member_id = (EditText)findViewById(R.id.add_member_project_member_id);
		member_added_list = (ListView)findViewById(R.id.add_member_list_added);
		finish_button = (Button)findViewById(R.id.add_member_project_finish);
		finish_button.setOnClickListener(this);
		members = new ArrayList<UserAdded>();
		Add_Member_Added_List_Adapter adapter = new Add_Member_Added_List_Adapter(AddMemberToProject.this,getApplicationContext(), R.layout.add_member_list_added_row,members);
		member_added_list.setAdapter(adapter);
	}


	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		if (v == add_member) {
			String userID = member_id.getText().toString();
			//validation
			if (userID.equals("")) {
				AlertDialog.Builder builder = new AlertDialog.Builder(AddMemberToProject.this);
				builder.setMessage("Member ID cannot be empty!")
				.setNegativeButton("OK", new DialogInterface.OnClickListener() {
					public void onClick(DialogInterface dialog, int id) {
						dialog.cancel();
					}

				});
				AlertDialog alert = builder.create();
				alert.show();
				return;
			}
			if (isInTheList(userID)) {
				AlertDialog.Builder builder = new AlertDialog.Builder(AddMemberToProject.this);
				builder.setMessage("This member ID already in the list!")
				.setNegativeButton("OK", new DialogInterface.OnClickListener() {
					public void onClick(DialogInterface dialog, int id) {
						dialog.cancel();
					}

				});
				AlertDialog alert = builder.create();
				alert.show();
				return;
			}
			members.add(new UserAdded(userID));
			member_id.setText("");
			refreshList();

		}

	}

	public void refreshList() {
		member_added_list.invalidateViews();
	}

	//validate the current userID already in list or not.
	private boolean isInTheList (String userID) {
		for (UserAdded user : members) {
			if (user.getUserID().equals(userID)) {
				return true;
			}
		}
		return false;
	}
}
*/